/**
 * Created by yjp on 2017/10/25.
 */

var element,$;
layui.use(['element','jquery'], function() {
    element = layui.element;  //元素操作
    $ = layui.jquery;  // 注册 jquery 事件

    $('#adminAccount').html(sessionStorage.getItem('account'));
    
    //管理员退出
    $('#adminLogout').click(function () {
        sessionStorage.removeItem('account');
        sessionStorage.removeItem('userToken');
        top.location.href = "login.html";
    });
    if (!sessionStorage.getItem('userToken')) {  //token不存在时返回登录界面
        top.location.href = "login.html";
    }
    
    switch_to_frame('mainx_frm', 'goodList.html');  //商品录入
    

    $('.frdCrlManage').click(function () {
        switch_to_frame('mainx_frm', 'goodList.html');  //商品录入
    });
});

  
